import fetch from '@/utils/fetch'

export function getList(query) {
  return fetch({
    url: '/alarmTemplet/queryList',
    method: 'POST',
    params: query
  })
}

export function getAllList() {
  return fetch({
    url: '/alarmTemplet/queryAllList',
    method: 'get',
    params: {}
  })
}

export function queryListByAlarmTempletId(templetId) {
  return fetch({
    url: '/alarmTempletInstanceTypeRel/queryListByAlarmTempletId/' + templetId,
    method: 'get',
    params: {}
  })
}

export function saveAlarmTemplet(form) {
  return fetch({
    url: '/alarmTemplet/saveAlarmTemplet',
    method: 'POST',
    params: form
  })
}

export function deleteAlarmTempletById(templetId) {
  return fetch({
    url: '/alarmTemplet/deleteTempletById/' + templetId,
    method: 'get',
    params: {}
  })
}

export function alarmTempletToGroup(form) {
  return fetch({
    url: '/alarmTemplet/alarmTempletToGroup',
    method: 'POST',
    params: form
  })
}

export function getAlarmRuleList(query) {
  return fetch({
    url: '/alarmRule/queryList',
    method: 'POST',
    params: query
  })
}

export function queryHistoryList(query) {
  return fetch({
    url: '/alarmHistory/queryList',
    method: 'POST',
    params: query
  })
}

export function modifyRule(params) {
  return fetch({
    url: '/alarmRule/modifyRule',
    method: 'POST',
    params: params
  })
}

export function deleteAlarmRuleById(ruleId) {
  return fetch({
    url: '/alarmRule/deleteAlarmRuleById/' + ruleId,
    method: 'get',
    params: {}
  })
}

export function deleteAlarmRuleByIds(query) {
  return fetch({
    url: '/alarmRule/deleteAlarmRuleByIds',
    method: 'get',
    params: query
  })
}

export function disabledRuleByIds(query) {
  return fetch({
    url: '/alarmRule/disabledRuleByIds',
    method: 'get',
    params: query
  })
}

export function enabledRuleByIds(query) {
  return fetch({
    url: '/alarmRule/enabledRuleByIds',
    method: 'get',
    params: query
  })
}

export function getAlarmContactsList(query) {
  return fetch({
    url: '/alarmContacts/queryList',
    method: 'POST',
    params: query
  })
}

export function getAlarmContactsAllList() {
  return fetch({
    url: '/alarmContacts/queryAllList',
    method: 'POST',
    params: {}
  })
}

export function deleteAlarmContactsById(contactsById) {
  return fetch({
    url: '/alarmContacts/deleteAlarmContactsById/' + contactsById,
    method: 'get',
    params: {}
  })
}

export function deleteAlarmContactsByIds(query) {
  return fetch({
    url: '/alarmContacts/deleteAlarmContactsByIds',
    method: 'get',
    params: query
  })
}

export function getAlarmContactsGroupList() {
  return fetch({
    url: '/alarmContacts/queryGroupList',
    method: 'get',
    params: {}
  })
}

export function getAlarmContactsGroupListByIds(query) {
  return fetch({
    url: '/alarmContacts/queryGroupListByIds',
    method: 'get',
    params: query
  })
}

export function modifyAlarmContacts(form) {
  return fetch({
    url: '/alarmContacts/modifyAlarmContacts',
    method: 'POST',
    params: form
  })
}

export function modifyAlarmContactsGroup(form) {
  return fetch({
    url: '/alarmContacts/modifyAlarmContactsGroup',
    method: 'POST',
    params: form
  })
}

export function contactsAddToGroup(query) {
  return fetch({
    url: '/alarmContacts/contactsAddToGroup',
    method: 'get',
    params: query
  })
}

export function deleteAlarmContactsGroupRef(query) {
  return fetch({
    url: '/alarmContacts/deleteAlarmContactsGroupRef',
    method: 'get',
    params: query
  })
}

export function deleteAlarmContactsGroup(alarmContactGroupId) {
  return fetch({
    url: '/alarmContacts/deleteAlarmContactsGroup/' + alarmContactGroupId,
    method: 'get',
    params: {}
  })
}

export function queryNetWorkList(page) {
  return fetch({
    url: '/netWork/queryList',
    method: 'POST',
    params: page
  })
}

export function modifyNetWork(params) {
  return fetch({
    url: '/netWork/modifyNetWork',
    method: 'POST',
    params: params
  })
}

export function deleteNetWorkByIds(query) {
  return fetch({
    url: '/netWork/deleteNetWorkByIds',
    method: 'get',
    params: query
  })
}

export function querySiteRuleList(page) {
  return fetch({
    url: '/cat2/site/querySiteRuleList',
    method: 'POST',
    params: page
  })
}

export function modifySiteRule(page) {
  return fetch({
    url: '/cat2/site/modifySiteRule',
    method: 'POST',
    params: page
  })
}

export function deleteBatchSiteConf(query) {
  return fetch({
    url: '/cat2/site/deleteBatchSiteConf',
    method: 'get',
    params: query
  })
}

export function queryBySiteConfId(query) {
  return fetch({
    url: '/cat2/site/queryBySiteConfId',
    method: 'get',
    params: query
  })
}

export function roleList() {
  return fetch({
    url: '/cat2/site/roleList',
    method: 'get'
  })
}

export function enabledRule(query) {
  return fetch({
    url: '/cat2/site/enabledRule',
    method: 'GET',
    params: query
  })
}

export function resumeRule(query) {
  return fetch({
    url: '/cat2/site/resumeRule',
    method: 'GET',
    params: query
  })
}

export function deleteBatchSiteRule(query) {
  return fetch({
    url: '/cat2/site/deleteBatchSiteRule',
    method: 'get',
    params: query
  })
}
